/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package meteocal.gui;

import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;
import meteocal.business.boundary.EventFacade;
import meteocal.business.entity.Event;
import meteocal.business.security.boundary.UserManager;

/**
 *
 * @author luana
 */
@Named(value = "showEventBean")
@SessionScoped
public class ShowEventBean implements Serializable {
    
    private List<Event> currentEventList;
    private List<Event> userEvent;
    private Event selectedEvent;
    private Event event;
    private Date keywordDate;
    private boolean canModify;
    
    @EJB 
    EventFacade ef;
    
    @EJB
    UserManager um;

    /**
     * Creates a new instance of ShowEventBean
     */
    public ShowEventBean() {
    }
      
    public void searchEvent(){
        
        currentEventList = ef.searchEventDate(keywordDate);
    }
    
    public List<Event> getCurrentEventList() {
        return currentEventList;
    }

    public void setCurrentEventList(List<Event> currentEventList) {
        this.currentEventList = currentEventList;
    }

    public Event getSelectedEvent() {
        return selectedEvent;
    }

    public void setSelectedEvent(Event selectedEvent) {
        this.selectedEvent = selectedEvent;
    }

    public Event getEvent() {
        return event;
    }

    public void setEvent(Event event) {
        this.event = event;
    }

    public Date getKeywordDate() {
        return keywordDate;
    }

    public void setKeywordDate(Date keywordDate) {
        this.keywordDate = keywordDate;
    }
    
    
}
